package cn.lgp6.ziyou_util.common.controller;

import java.lang.reflect.Field;

public class BaseController {

    public static boolean objectFieldsIsNotNull(Object obj) {
        Field[] declaredFields = obj.getClass().getDeclaredFields();
        for (Field declaredField : declaredFields) {
            declaredField.setAccessible(true);
            try {
                if (declaredField.get(obj)==null){
                    System.out.println(declaredField.getName());
                    return false;
                }
            } catch (IllegalAccessException e) {
                e.printStackTrace();
            }
        }
        return true;
    }
}
